FROM php:7-fpm-alpine

COPY composer /usr/bin/composer
RUN chmod +x /usr/bin/composer \
        && composer config -g repo.packagist composer https://packagist.laravel-china.org \
        && sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
        && apk update \
        && apk add git libxml2-dev libpng-dev freetype-dev \
        && docker-php-ext-install gd opcache pdo pdo_mysql
